const permissionRouter = {
  path: 'permission',
  component: () => import('@/views/_level2/index'),
  redirect: 'noRedirect',
  alwaysShow: true, // will always show the root menu
  name: 'Permission',
  meta: {
    title: '功能授权',
    icon: 'lock',
    roles: ['admin', 'editor'], // you can set roles in root nav
  },
  children: [
    {
      path: 'page',
      component: () => import('@/views/_framecapability/permission/page'),
      name: 'PagePermission',
      meta: {
        title: '页面授权',
        roles: ['admin'], // or you can only set roles in sub nav
      },
    },
    {
      path: 'directive',
      component: () => import('@/views/_framecapability/permission/directive'),
      name: 'DirectivePermission',
      meta: {
        title: '指令授权',
        // if do not set roles, means: this page does not require permission
      },
    },
    // {
    //   path: 'role',
    //   component: () => import('@/views/_framecapability/permission/role'),
    //   name: 'RolePermission',
    //   meta: {
    //     title: '角色授权',
    //     roles: ['admin'],
    //   },
    // },
  ],
}

export default permissionRouter
